﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/Layouts/Admin.Master" AutoEventWireup="true" CodeBehind="ConfigsEdit.aspx.cs" Inherits="Thuoc24h.AdminCP.Pages.ConfigsEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphContent" runat="server">
    <Telerik:RadPanelBar runat="server" ID="RadPanelBar1" Width="100%" Height="100%"
        ExpandMode="FullExpandedItem">
        <Items>
            <Telerik:RadPanelItem Text="Cấu hình website" Expanded="True">
                <ContentTemplate>
                    <div class="item">
                        <label>Key:</label><Telerik:RadTextBox runat="server" ID="txtName" Width="350px"/>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" Display="Dynamic" ForeColor="red" ControlToValidate="txtName" runat="server" ErrorMessage="*" />
                    </div>
                    <div class="item">
                        <label>Mô tả:</label><Telerik:RadTextBox runat="server" ID="edtDescription" TextMode="MultiLine" Width="70%" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" Display="Dynamic" ForeColor="red" ControlToValidate="edtDescription" runat="server" ErrorMessage="*" />
                    </div>

                    <div class="item">
                        <table>

                            <tr>
                                <td>
                                    <div class="fleft" style="font-weight: bold; width: 120px; text-align: right; color: #00156E; font-size: 12px;">Giá trị:</div>
                                </td>
                                <td>
                                    <Telerik:RadEditor runat="server" ID="edtDetail" Width="80%" Height="" >
                                <ImageManager UploadPaths="~/Upload" DeletePaths="~/Upload" ViewPaths="~/Upload" ImageEditorFileSuffix="~/Upload/"></ImageManager>
                                        
                                    </Telerik:RadEditor>
                                </td>
                            </tr>
                        </table>



                    </div>

                    <div class="item" style="padding-bottom: 30px">
                        <label></label>
                        <Telerik:RadButton runat="server" ID="btnSave" OnClick="btnSave_OnClick"></Telerik:RadButton>
                        <Telerik:RadButton ID="btnReset" runat="server" Text="Làm lại" OnClick="OnClick" CausesValidation="False"></Telerik:RadButton>
                    </div>

                    <Telerik:RadGrid runat="server" ID="gridData" CellSpacing="0" GridLines="None" Width="100%" AutoGenerateColumns="False"
                        AllowPaging="True" AllowCustomPaging="True" OnItemCommand="gridData_ItemCommand" AllowSorting="True">
                        <MasterTableView ClientDataKeyNames="Id" DataKeyNames="Id" GroupLoadMode="Client"
                            NoMasterRecordsText="Không có bản ghi nào.">
                            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                <HeaderStyle Width="20px"></HeaderStyle>
                            </RowIndicatorColumn>

                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                <HeaderStyle Width="20px"></HeaderStyle>
                            </ExpandCollapseColumn>
                            <GroupByExpressions>
                            </GroupByExpressions>
                            <Columns>
                                <Telerik:GridTemplateColumn HeaderText="STT" UniqueName="Id">
                                    <ItemStyle HorizontalAlign="Left" CssClass="center" />
                                    <ItemTemplate>
                                        <%#
                   (gridData.PageSize * (gridData.CurrentPageIndex + 1)) - gridData.PageSize + Container.ItemIndex + 1
                                        %>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" Width="50px" />
                                </Telerik:GridTemplateColumn>
                                <Telerik:GridTemplateColumn HeaderText="Mô tả" UniqueName="Description">
                                    <ItemStyle HorizontalAlign="Left" CssClass="center" />
                                    <ItemTemplate>
                                        <%#Eval("Description")%>
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center" />
                                </Telerik:GridTemplateColumn>
                               
                                <Telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Edit" ConfirmDialogType="RadWindow"
                                    HeaderText="Sửa"
                                    Text="Sửa" UniqueName="Edit">
                                    <ItemStyle CssClass="center" Width="32px" />
                                    <HeaderStyle HorizontalAlign="Center" Width="32px" Font-Bold="True" />
                                </Telerik:GridButtonColumn>
                                <%--<Telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow"
                                    ConfirmText="Bạn có chắc chắn muốn xóa" ConfirmTitle="Xóa" HeaderText="X&#243;a"
                                    Text="X&#243;a" UniqueName="Delete">
                                    <ItemStyle CssClass="center" Width="32px" />
                                    <HeaderStyle HorizontalAlign="Center" Width="32px" Font-Bold="True" />
                                </Telerik:GridButtonColumn>--%>
                            </Columns>

                            <EditFormSettings EditFormType="Template">
                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                </EditColumn>

                            </EditFormSettings>

                        </MasterTableView>
                        <ClientSettings EnableRowHoverStyle="True">
                        </ClientSettings>
                        <FilterMenu EnableImageSprites="False"></FilterMenu>
                        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
                    </Telerik:RadGrid>
                </ContentTemplate>
            </Telerik:RadPanelItem>
        </Items>
    </Telerik:RadPanelBar>
</asp:Content>
